﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections.Specialized;

namespace AzureBlogWebRole.widgets.ChannelActive
{
    public partial class edit : WidgetEditBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!Page.IsPostBack)
            {
                StringDictionary settings = GetSettings();
                if (settings.ContainsKey("SensorActiveChannel"))
                    DDl_channels.SelectedValue = settings["SensorActiveChannel"];
            }
        }

        public override void Save()
        {
            StringDictionary settings = GetSettings();
            settings["SensorActiveChannel"] = DDl_channels.SelectedValue;
            SaveSettings(settings);
        }
    }
}